package com.ayoka.adapter;

import android.widget.ImageView;

import com.ayoka.R;
import com.ayoka.bean.TrainingPackageBean;
import com.ayoka.mvp.TrainingGroupMVP.TrainingGroupModel.TrainingGroupSectionEntity;
import com.jcp.baselibrary.brvah.BaseQuickAdapter;
import com.jcp.baselibrary.brvah.BaseSectionQuickAdapter;
import com.jcp.baselibrary.brvah.BaseViewHolder;
import com.jincp.image.load.ImageLoaderProxy;

import java.util.List;

/**
 * Created by jinchunping on 2018/4/11.
 */

public class TrainingPackageAdapter extends BaseQuickAdapter<TrainingPackageBean, BaseViewHolder> {

    public TrainingPackageAdapter() {
        super(R.layout.item_training_package, null);
    }

    @Override
    protected void convert(BaseViewHolder holder, TrainingPackageBean item) {
        ImageLoaderProxy.getInstance().displayImage(item.ImgUrl, (ImageView) holder.getView(R.id.iv_training_picture));
        holder.setText(R.id.tv_training_title, item.PackageName)
                .setText(R.id.tv_training_description, item.SubTitle)
                .setText(R.id.tv_training_count, item.getSoltQuantity());
    }
}
